package com.kefu.boss.vo;

import cn.hutool.core.bean.BeanUtil;
import com.kefu.boss.model.BossMenu;
import com.kefu.common.vo.AbstractUpdateVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

@Data
@ApiModel
public class BossMenuUpdateVo extends AbstractUpdateVo<BossMenu, String> {
    @NotEmpty
    @ApiModelProperty(value = "主键")
    private String id;
    @ApiModelProperty(value = "上级")
    private String parentId;
    @ApiModelProperty(value = "菜单名称")
    private String name;
    @ApiModelProperty(value = "前端标识")
    private String path;
    @ApiModelProperty(value = "图标")
    private String icon;
    /**
     * 是否隐藏
     */
    @ApiModelProperty(name = "hidden", value = "是否隐藏")
    private Integer hidden;
    /**
     * 类型
     */
    @ApiModelProperty(name = "type", value = "类型")
    private String type;
    /**
     * 组件
     */
    @ApiModelProperty(name = "component", value = "组件")
    private String component;

    /**
     * 重定向
     */
    @ApiModelProperty(name = "redirect", value = "重定向")
    private String redirect;

    @Override
    public BossMenu convert() {
        BossMenu info = BeanUtil.toBean(this, BossMenu.class);
        return info;
    }
}
